{* {extends path/to/@layout.phtml} -- not necessary, framework knows its "main" layout *}

{block #content}

    <h1>{$title}</h1>
{*
    <div n:if="isset($critical)">
        {$critical}
        {capture $link1}<a href="{link Logs:Php:Process:}" title="{!_'browse error logs'}">{!_"browse error logs"}</a>{/capture}
        {capture $link2}<a href="{link Modules:ModulesManagement:default}" title="{!_'set up and manage database'}">{!_"set up and manage database"}</a>{/capture}
        <p>{!_"You can %s and/or %s.", $link1, $link2}</p>
        <h2>{!_"Additional info of Critical Mode"}</h2>
        {!_"Last RDBMS:"} {if (!empty($dbname))} {$dbname} @ {/if} {$dbserver}
        <p>{$additional_info}</p>
    </div>
    {if isset($arePhpLogsAllowed) && $arePhpLogsAllowed==TRUE}
    {if $logArray != null}
    <h2 class="fontSmall">{!_"PHP Error Logs"}</h2>

    <table class="fontSmall">
        <tr>
            <th>{!_"Time"}</th>
            <th>{!_"Type"}</th>
        </tr>
        {foreach $logArray as $log}
        <tr{if $iterator->even} class="td_odd"{/if}>
            <td>{$log["date"]}</td>
            <td>{$log["type"]}</td>
        </tr>
        {/foreach}
    </table>
    {if $isUnprocessed}
    <div class="fontSmall">{!_"There are some unprocessed PHP error logs"}</div>
    <div><a href="{link Logs:Php:Process:}" title="{!_'PHP Error Logs'}" class="button ui-state-default ui-corner-all fontSmall"><span class="ui-icon ui-icon-gear floatLeft">&nbsp;</span>&nbsp;{!_"Process logs"}</a></div>
    {else}
    <div><a href="{link Logs:Php:Process:}" title="{!_'PHP Error Logs'}" class="button  ui-state-default ui-corner-all fontSmall"><span class="ui-icon ui-icon-carat-1-e floatLeft">&nbsp;</span>&nbsp;{!_"Show more logs"}</a></div>
    {/if}
    {/if}
    {/if}

    {if isset($areAclLogsAllowed) && $arePhpLogsAllowed==TRUE}
    {if $logs != null}
    <div>
        <h2 class="fontSmall">{!_"PHP Acl Logs"}</h2>
        {if count($logs) > 0}
        <table class="fontSmall">
            <tr>
                <th>{!_"ID"}</th>
                <th>{!_"User ID"}</th>
                <th>{!_"Time"}</th>
                <th>{!_"Action"}</th>
                <th>{!_"Role"}</th>
                <th>{!_"Resource"}</th>
                <th>{!_"Privilege"}</th>
                <th>{!_"Permission"}</th>
            </tr>
            {foreach $logs as $log}
            <tr>
                {foreach $log as $item}
                <td>{$item}</td>
                {/foreach}
            </tr>
            {/foreach}
        </table>

        {else}
        <div>{!_'No logs available.'}</div>
        {/if}
    </div>
    {/if}
    {/if}
*}
{/block}